package com.ita.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ita.dao.IUserDao;
import com.ita.service.IUserService;
import com.ita.vo.User;
@Service(value="userServiceImpl")
public class UserServiceImpl implements IUserService {

	private IUserDao dao;
	
	public IUserDao getDao() {
		return dao;
	}

	@Resource
	public void setDao(IUserDao dao) {
		this.dao = dao;
	}

	@Override
	public User login(User user) {
		return dao.query(user);
	}

	@Override
	@Transactional
	public int register(User user) {
		
		return dao.register(user);
	}

}
